import 'package:flutter/material.dart';
import 'package:wk_weather/views/MyApp.dart';
import 'package:wk_weather/views/widget/LoadingDialog.dart';

void showOTADialog(String apkUrl, String desc, String versionName) {
  // todo 模拟延时加载
  /*Future.delayed(Duration(milliseconds: 2000)).then((e) {
    showDialog <LoadingDialog>(
        context: globalKey.currentContext,
        barrierDismissible: false,
        builder: (BuildContext context) {
          return new OTADialog(desc, versionName, apkUrl);
        });
  });*/

}


void showAppDialog({String loadingMsg = "正在加载中..."}) {
  showDialog<LoadingDialog>(
      context: globalKey.currentContext,
      barrierDismissible: false,
      builder: (BuildContext context) {
        return new LoadingDialog(
          text: loadingMsg,
        );
      });
}




